import request from '@/utils/request'

export const uploadUrl = `http://api.sakihomura.top/upload`

request.defaults.withCredentials = false

export function getQiniuToken(data) {
  return request({
    url: 'http://localhost:3000/token',
    method: 'post',
    data
  })
}

export function upLoadFile(data) {
  return request({
    url: 'http://up-z2.qiniup.com',
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}
